_ReminderList2JSON
(21 actions, 41 KB)
0 Dictionary »
15
{}
1 Find Reminders »
2
3
ContentItemFilter
:
• All the following are true List is
[Shortcut Input]
Is Not Completed
2 If
[1 Reminders]
has any value
3 Repeat with Each in
[1 Reminders]
4 Dictionary
➔ reminderDict
»
9
12
{ "name": "
[Repeat Item
’s Name
]
", "notes": "
[Repeat Item
’s Notes
]
", "due_date": "
[Repeat Item
’s Due Date
]
", "priority": "
[Repeat Item
’s Priority
]
", "flagged":
[Repeat Item
’s Is Flagged
]
as Boolean
, "list": "
[Repeat Item
’s List
]
", "url": "
[Repeat Item
’s URL
]
", "tags": "
[Repeat Item
’s Tags
]
" }
5 If
[Repeat Item
’s Has Subtasks
]
is
6 Repeat[2] with Each in
[Repeat Item
’s Subtasks
]
7 Dictionary
{ "parent_reminder": "
[Repeat Item 2
’s Parent Reminder
]
", "name": "
[Repeat Item 2
’s Name
]
", "notes": "
[Repeat Item 2
’s Notes
]
", "due_date": "
[Repeat Item 2
’s Due Date
]
", "priority": "
[Repeat Item 2
’s Priority
]
", "flagged":
[Repeat Item 2
’s Is Flagged
]
as Boolean
, "list": "
[Repeat Item 2
’s List
]
", "url": "
[Repeat Item 2
’s URL
]
", "tags": "
[Repeat Item 2
’s Tags
]
" }
8 End Repeat[2] with Each »
9 Set Dictionary Value for
subtasks
to
[8 Repeat Results]
in
[4 reminderDict]
10 Otherwise
11 Text
➔ ""
»
12 Set Dictionary Value for
subtasks
to
[11 ""]
in
[4 reminderDict]
13 End If
14 End Repeat with Each ▵
3
»
15 Set Dictionary Value for
reminders
to
[14 Repeat Results]
in
[0 Dictionary
.mainDict
]
»
16 Replace Text
"subtasks":(\{.*?\})
with
"subtasks":[$1]
in
[15 Dictionary]
»
ReplaceTextRegularExpression
:
true
17 Replace Text
"subtasks":""
with
"subtasks":[]
in
[16 Updated Text]
»
18 Run Shortcut
Pretty Print Dictionary
»
Input
:
[17 Updated Text]
Workflow
:
{ "workflowIdentifier": "0F135E84-71A6-46BF-BC50-10FC69B847A2", "workflowName": "Pretty Print Dictionary", "isSelf": false }
19 Stop and Output
[18 Shortcut Result]
20 End If ▵
2